import { StandardMaterial, Texture } from "babylonjs";

export class MaterialLib {

	private readonly materials: {
		grass: StandardMaterial,
	}

	constructor(size: number) {
		// 草方块材质
		let grassMaterial = new StandardMaterial('GrassMaterial');
		let grassTexture = new Texture(`assets/game/textures/blocks/grass_${size}.png`);
		grassMaterial.diffuseTexture = grassTexture;
		this.materials = {
			grass: grassMaterial,
		}
	}

	public getGrassMaterial(): StandardMaterial {
		return this.materials.grass;
	}

}
